package com.wcfsy.wechat.wx.entity;

import java.util.Date;

import com.wcfsy.wechat.wx.util.DateUtil;
import com.wcfsy.wechat.wx.util.StringUtil;

/**
 * 兑换记录
 */
public class ChangeRecordInfo extends BaseEntity {
	/**
	 * 奖品Id
	 */
	private int prizeId;
	/**
	 * 用户Id
	 */
	private int userId;
	/**
	 * 兑换日期
	 */
	private Date changeDate;
	/**
	 * 兑换状态
	 */
	private String status;
	/**
	 * 奖品名称
	 */
	private String prizeName;
	/**
	 * 所需原料
	 */
	private int material;
	/**
	 * 备注信息
	 */
	private String remark;
	/**
	 * 更新时间
	 */
	private Date updateDate;
	/**
	 * 1实物物品，2虚拟物品
	 */
	private int isVirtual;
	/**
	 * 手机号码
	 */
	private String mobile;
	/**
	 * 收货地址
	 */
	private String address;
	/**
	 * 客户姓名
	 */
	private String customerName;

	private String nickname;

	private String openid;

	private String changeDateStr;
	private String changeTimeStr;

	public void setChangeDateStr(String changeDateStr) {
		this.changeDateStr = changeDateStr;
	}

	public void setChangeTimeStr(String changeTimeStr) {
		this.changeTimeStr = changeTimeStr;
	}

	public String getChangeDateStr() {
		changeDateStr = DateUtil.DateToString(changeDate, "yyyy-MM-dd");
		return changeDateStr;
	}

	public String getChangeTimeStr() {
		changeTimeStr = DateUtil.DateToString(changeDate, "HH:mm");
		return changeTimeStr;
	}

	public Date getChangeDate() {
		return changeDate;
	}

	public void setChangeDate(Date changeDate) {
		this.changeDate = changeDate;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getPrizeName() {
		return prizeName;
	}

	public void setPrizeName(String prizeName) {
		this.prizeName = prizeName;
	}

	public int getMaterial() {
		return material;
	}

	public void setMaterial(int material) {
		this.material = material;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public int getIsVirtual() {
		return isVirtual;
	}

	public void setIsVirtual(int isVirtual) {
		this.isVirtual = isVirtual;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public int getPrizeId() {
		return prizeId;
	}

	public void setPrizeId(int prizeId) {
		this.prizeId = prizeId;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public String getCustomerName() {
		return customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getNickname() {
		if (StringUtil.isNotBlank(nickname)) {
			return StringUtil.decode(this.nickname);
		}
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

}
